import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/advert/list',
    method: 'get',
    params: query
  })
}

export function createBanner(data) {
  return request({
    url: '/api/advert/create',
    method: 'post',
    data
  })
}

export function updateBanner(data) {
  return request({
    url: '/api/advert/update',
    method: 'post',
    data
  })
}

export function deleteBanner(bannerId) {
  return request({
    url: '/api/advert/delete/' + bannerId,
    method: 'post'
  })
}
